<?php 
if (! defined('BASEPATH')) {
    exit('Access Denied');
}

/*
*author wangjian
*time 2013-03-16
*/
class Index extends CI_Controller {
	private $username ;
    function Index(){
        parent::__construct();
		$this->load->library('admin_common');//加载admin的公用方法
		$this->load->library('session');//加载session
		$this->username =  $this->session->userdata('username');
	
    }
    //top
    function top(){
    	
		$data=array(
			'username'=>$this->username
		);
        $this->load->view('admin/top',$data);
    }
    //menu
    function menu(){
         $this->load->view('admin/menu');
    }
    function main(){
         $this->load->view('admin/main');
    }
    //后台框架首页方法
    function frame(){
    	$this->load->view("admin/frame");
    }
    //
    /* function archive(){
    	$this->load->view("admin/archive");
    } */
    //测试数据库
    function test_data(){
    	$db1 = $this->load->database('default',true);
    	$query = $db1->query("select * from tmodule_conf");
    	foreach($query->result() as $row){
    		$result[] = $row ;
    	}
    	echo '<pre>';
    	print_r($result);
    }
    function test11(){
    	$db1 = $this->load->database('test1',true);
    	$query = $db1->query("select * from pre_car_info");
    	foreach($query->result() as $row){
    		$result[] = $row ;
    	}
    	echo '<pre>';
    	print_r($result);
    	
    }
    
}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */